class demoController{
  async demo (ctx) {
  ctx.body = {
    code: 200,
    msg:'succeed'
  }
  }
  async getter () {
    const result = ctx.request.query
    ctx.body = {
      code: 200,
      data:result,
      msg:'succeed'
    }
  }
   async poster () {
    const {body} = ctx.request//取参数
    ctx.body = {
      code: 200,
      ...body,
      msg:'succeed'
    }
  }
}
export default new demoController()